ac.skill('冲击波模板'){
    temp = '攻击触发',
    art = [[ReplaceableTextures\CommandButtons\BTNMarksmanship.blp]],
    skill_type = "passive",
    count = 5,
    on_run = function(self,hero,target)
        local hero = self.owner
        local point1 = hero:get_point()
        local point2 = target:get_point()
        local angle = point1 / point2
        local num = self.count
        local point3 = point1 - {angle + 90  + math.random(180),150}
        local angle = point3 / point2
        local effect = point3:effect
        {
            model = hero:get_model(),
            angle = angle,
            hide_when_remove = true,
            color = {30,30,30,50},
            time = 1,
        }
        effect:play_animation('attack')
        ac.ui_tag{
            string = self.name,
            icon = self.art,
            damage = 0,
            font_size = 16,
            target = point3,
            angle = math.random(45,135),
            speed = 120,
            life = 0.5,
            fade = 0.25,
            jump_rate = 1,
            jump_time = 0.5,
        }
        ac.wait(500,function()
            local mover = point3:launch_wave(self.model1,angle,1200,hero:get('攻击距离') + 600,nil,80)
            sc.loopUnit(0.03,mover,70,function(group,unit)
                if unit:is_enemy(hero) then
                    if self.model2 then
                        unit:add_effect(self.model2):remove()
                    end
                    hero:create_damage(unit,self.rate1,self)
                    --mover:remove()
                end
            end)
        end)

        --local lock = {}
        -- for a=1,num do
        --     local r = angle + (a-num/2 -0.5)*15
        --     local mover = hero:launch_wave(self.model1,r,2400,hero:get('攻击距离') + 100)
        --     sc.loopUnit(0.03,mover,70,function(group,unit)
        --         if unit:is_enemy(hero) then
        --             if self.model2 then
        --                 unit:add_effect(self.model2):remove()
        --             end
        --             hero:create_damage(unit,self.rate1,self)
        --             mover:remove()
        --         end
        --     end):set_lock(lock)
        -- end
    end
}




ac.skill('UR-敏捷1'){
    temp = '冲击波模板',
    model1 = [[Abilities\Weapons\SearingArrow\SearingArrowMissile.mdl]],
}

ac.skill('UR-敏捷2'){
    temp = '冲击波模板',
    model1 = [[Abilities\Spells\Items\OrbCorruption\OrbCorruptionMissile.mdl]],
}

ac.skill('UR-敏捷3'){
    temp = '冲击波模板',
    model1 = [[Abilities\Spells\Other\FrostArrows\NagaColdArrowMissile.mdl]],
}

ac.skill('UR-敏捷4'){
    temp = '冲击波模板',
    model1 = [[Abilities\Spells\Items\OrbVenom\OrbVenomMissile.mdl]],
}
